package com.example.crm.repository;

import com.example.crm.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @author lenovo
 */
public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificationExecutor<User> {
    /**
     * 按用户名和密码进行查询
     * @param username
     * @param password
     * @return
     */
    public List<User> findByUsrNameAndUsrPassword(String username, String password);

    /**
     * 根据用户名查询用户对象
     * @param usrName
     * @return
     */
    public User findUserByUsrName(String usrName);
}